home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 April / macformat-023.iso / Shareware in MacFormat / brailler0.5b / brlr ƒ / Shell ƒ / styled text.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-12-20  |  830 b   |  40 lines  |  [TEXT/MMCC]

  1. #ifndef __STYLED_TEXT_H__
  2. #define __STYLED_TEXT_H__
  3.  
  4. typedef unsigned char    **CharHandle;
  5.  
  6. typedef struct
  7. {
  8.     long            offset;
  9.     short            lineHeight;
  10.     short            fontDescent;
  11.     short            fontNum;
  12.     unsigned char    fontStyle;
  13.     unsigned char    unused1;
  14.     short            fontSize;
  15.     short            unused2;
  16.     short            unused3;
  17.     short            unused4;
  18. } OneStyle;
  19.  
  20. typedef struct
  21. {
  22.     short        numStyles;
  23.     OneStyle    theStyle[31];
  24. } StylRec, *StylPtr, **StylHandle;
  25.  
  26. enum
  27. {
  28.     kLeft=0,
  29.     kCenter
  30. };
  31.  
  32. void DrawTheText(CharHandle theText, StylHandle theStyleHandle, short theJust,
  33.     short theMode, Rect theRect);
  34. void DrawThePartialText(CharHandle theText, StylHandle theStyleHandle, short theJust,
  35.     short theMode, Rect theRect, short startLine, short endLinePlusOne);
  36. short CountLines(CharHandle theText, StylHandle theStyleHandle, short theJust,
  37.     short theMode, Rect theRect);
  38.  
  39. #endif
  40.